﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SimpleRest.Core.Exceptions;

namespace SimpleRest.Core.Extensions.Exceptions
{
    public class MediaTypeNotSupportedException : WebExceptionBase
    {
        public MediaTypeNotSupportedException()
            : base("The media type formatter specified is not supported.") { }
        public MediaTypeNotSupportedException(bool isContentType)
            : base(string.Format("The media type formatter specified for {0} is not supported.", isContentType ? "Content-Type" : "Accept")){}

        public override System.Net.HttpStatusCode StatusCode
        {
            get { return System.Net.HttpStatusCode.UnsupportedMediaType; }
        }

        public override string ErrorCode
        {
            get { return null; }
        }
    }
}
